home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / Converters / Convert_RTF / Source / rtfToken.h < prev    next >
Text File  |  1995-06-12  |  2KB  |  55 lines

  1. /***********************************************************************\
  2. Token class for Convert RTF which converts between Mac and NeXT rtf formats.
  3. Copyright (C) 1993 David John Burrowes
  4.  
  5. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version.
  6.  
  7. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
  8.  
  9. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  10.  
  11. The author, David John Burrowes, can be reached at:
  12.     davidjohn@kira.net.netcom.com
  13.     David John Burrowes
  14.     1926 Ivy #10
  15.     San Mateo, CA 94403-1367
  16. \***********************************************************************/
  17.  
  18. #import "ResultObject.h"
  19.  
  20. //
  21. //    These define the different types of tokens we can read from an RTF file
  22. //
  23. typedef enum
  24. {
  25.     tokenNoToken,
  26.     tokenBeginGroup,
  27.     tokenEndGroup,
  28.     tokenControlSymbol,
  29.     tokenControlWord,
  30.     tokenWord
  31. }
  32. TokenType;
  33.  
  34.  
  35. @interface rtfToken:ResultObject
  36. {
  37.     TokenType    type;            // the type of this token
  38.     CString        name;            // the name of the token.
  39.     Boolean        hasParameter;    // True if the token has a parameter
  40.     Integer        parameter;        // the parameter value for the token.
  41. }
  42.  
  43.  
  44. - initTokenOfType: (TokenType) theType;
  45. - free;
  46. - SetTokenName: (CString) theName; 
  47. - SetTokenValue: (Integer) theValue;
  48. - (TokenType)  GetType;
  49. - (CString)  GetName;
  50. - (Boolean) HasValue;
  51. - (Integer)  GetValue;
  52. - (PositiveInteger)  GetLength;
  53. @end
  54.  
  55.